/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package base.mo;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Diego
 */
@Entity
@Table(name = "curso", catalog = "matriculas", schema = "")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Curso.findAll", query = "SELECT c FROM Curso c"),
    @NamedQuery(name = "Curso.findByIdCurso", query = "SELECT c FROM Curso c WHERE c.idCurso = :idCurso"),
    @NamedQuery(name = "Curso.findByIdMatricula", query = "SELECT c FROM Curso c WHERE c.idMatricula = :idMatricula"),
    @NamedQuery(name = "Curso.findByParalelo", query = "SELECT c FROM Curso c WHERE c.paralelo = :paralelo"),
    @NamedQuery(name = "Curso.findByNumAlumno", query = "SELECT c FROM Curso c WHERE c.numAlumno = :numAlumno")})
public class Curso implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID_CURSO", nullable = false)
    private Integer idCurso;
    @Column(name = "ID_MATRICULA")
    private Integer idMatricula;
    @Size(max = 10)
    @Column(name = "PARALELO", length = 10)
    private String paralelo;
    @Column(name = "NUM_ALUMNO")
    private Long numAlumno;

    public Curso() {
    }

    public Curso(Integer idCurso) {
        this.idCurso = idCurso;
    }

    public Integer getIdCurso() {
        return idCurso;
    }

    public void setIdCurso(Integer idCurso) {
        this.idCurso = idCurso;
    }

    public Integer getIdMatricula() {
        return idMatricula;
    }

    public void setIdMatricula(Integer idMatricula) {
        this.idMatricula = idMatricula;
    }

    public String getParalelo() {
        return paralelo;
    }

    public void setParalelo(String paralelo) {
        this.paralelo = paralelo;
    }

    public Long getNumAlumno() {
        return numAlumno;
    }

    public void setNumAlumno(Long numAlumno) {
        this.numAlumno = numAlumno;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idCurso != null ? idCurso.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Curso)) {
            return false;
        }
        Curso other = (Curso) object;
        if ((this.idCurso == null && other.idCurso != null) || (this.idCurso != null && !this.idCurso.equals(other.idCurso))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "base.mo.Curso[ idCurso=" + idCurso + " ]";
    }
    
}
